{% extends 'base.html' %}
{% from 'bootstrap/form.html' import render_form %}

{% block content %}
	<div class="hello-form">
		{{ render_form(form)}}
	</div>

<h5 >{{ messages|length}} messages
	<samll class="float-right">
		<a href="#bottom" title="Go Bottom">&darr;</a>
	</samll>
</h5>
<div class="list-group">
	{% for message in messages %}
	<a class="list-group-item list-group-item-action flex-column">
		<div class="d-flex w-100 jsutify-content-between">
			<h5 class="mb-1 text-success">{{ message.name }}
				<small class="text-muted">{{ loop.revindex}}</small>
			</h5>
			<small>
				{{ moment(message.timestamp).fromNow(refresh=True)}}
			</small>
		</div>
		<p class="mb-1">{{ message.body}}</p>
	</a>
	{% endfor %}
</div>
{% endblock %}